// pages/my/my.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    userInfo: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var self = this;
    var appInstance = getApp()
    var user = appInstance.globalData.user;
    console.log(user);
    this.setData({
      userInfo: user
    })
  },


  moreOrderAction: function () {
    wx.navigateTo({
      url: '../order/order?index=0',
    });
  },


  addressAction: function () {
    wx.navigateTo({
      url: '../address/addresslist/addresslist?from=my',
    })
  },


  onItemClick: function (e) {
    var index = parseInt(e.currentTarget.dataset.index);
    wx.navigateTo({
      url: '../order/order?index=' + index,
    })
  }

})